import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/uploadByelement'
  },
  {
    path: '/uploadByelement',
    name: 'uploadByelement',
    component: () => import('../views/uploadByelement.vue')
  },
  {
    path: '/uploadByH5',
    name: 'uploadByH5',
    // route level code-splitting
    // this generates a separate chunk (uploadByH5.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/uploadByH5.vue')
  },
	{
	  path: '/uploadByCropper',
	  name: 'uploadByCropper',
	  // route level code-splitting
	  // this generates a separate chunk (ploadByCropper.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import('../views/uploadByCropper.vue')
	},

  {
    path: '/back_uploadByelement',
    name: 'back_uploadByelement',
    component: () => import('../views/back_uploadByelement.vue')
  },
  {
    path: '/back_uploadByH5',
    name: 'back_uploadByH5',
    // route level code-splitting
    // this generates a separate chunk (uploadByH5.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/back_uploadByH5.vue')
  },
	{
	  path: '/back_uploadByCropper',
	  name: 'back_uploadByCropper',
	  // route level code-splitting
	  // this generates a separate chunk (ploadByCropper.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import('../views/back_uploadByCropper.vue')
	}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
